package com.lgx.mall.business.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.lgx.common.entity.IdGenerator;
import com.lgx.right.entity.Organization;
import com.lgx.right.entity.User;

/**
 * 收益信息
 * @author pengdeyi
 *
 */
@Entity
@Table(name="TM_INCOME")
public class Income implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator=IdGenerator.ICOME_ID_GENERATOR)
	@TableGenerator(
			name = IdGenerator.ICOME_ID_GENERATOR,
			table = IdGenerator.GENERATOR_TABLE,
			pkColumnName = IdGenerator.GEN_NAME,
			pkColumnValue = IdGenerator.ICOME_ID_GENERATOR,
			valueColumnName = IdGenerator.GEN_VALUE,
			initialValue = 1,
			allocationSize = 1
	)
	private long id;
	
	private String type;//收益类型
	
	@ManyToOne
	@JoinColumn(name = "receive_id")
	private  Organization receive;//受益方
	
	private double amount;//收益额度
	
	private String level;//收益级别
	
	private Date incomeTime;//收益时间
	
	@ManyToOne
	@JoinColumn(name="creater_id")
	private User   creater;//创建人
	
	private Date createDate;
	
	private String isDelete;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Organization getReceive() {
		return receive;
	}

	public void setReceive(Organization receive) {
		this.receive = receive;
	}

	public double getAmount() {
		return amount;
	}

	public void setAmount(double amount) {
		this.amount = amount;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public Date getIncomeTime() {
		return incomeTime;
	}

	public void setIncomeTime(Date incomeTime) {
		this.incomeTime = incomeTime;
	}

	public User getCreater() {
		return creater;
	}

	public void setCreater(User creater) {
		this.creater = creater;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(String isDelete) {
		this.isDelete = isDelete;
	}
}
